<?php
header("Content-Type:text/html; charset=utf-8");
require("../../inc/common.inc.php");

$fid=intval($fid);
if ($fid==0){
	echo "-1";
	exit();
}
$fileinfo=$db->getinfo("select fpath from mx_sucai_file  where fid='$fid' limit 1");
if (!is_array($fileinfo)){
	echo "-1";
	exit();
}
$db->excu("delete from mx_sucai_file where fid='$fid'");
@unlink("../..".$fileinfo[fpath]);
echo "1";
exit();
?>